package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.Type;
import com.ruoyi.system.mapper.TypeMapper;
import com.ruoyi.system.service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class TypeServiceImpl implements TypeService {
    
    @Autowired
    private TypeMapper typeDao;
    
    @Override
    public List<Type> getAllTypeQuery() {
        return typeDao.getAllTypeQuery();
    }

    @Override
    public Type getTypeById(Long id) {
        return typeDao.getTypeById(id);
    }

    @Override
    public Type getTypeByName(String name) {
        return typeDao.getTypeByName(name);
    }

    @Override
    public int saveType(Type type) {
        return typeDao.saveType(type);
    }

    @Override
    public int updateType(Type type) {
        return typeDao.updateType(type);
    }

    @Override
    public void deleteType(Long id) {
        typeDao.deleteType(id);
    }
}
